﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Reflection;
using TPOJ.IProfileDAL;

namespace TPOJ.ProfileDALFactory
{
    public static class DataAccess
    {
        private static readonly string profilePath = ConfigurationManager.AppSettings["ProfileDAL"];

        public static ITPOJProfileProvider CreateProfileProvider()
        {
            string className = profilePath + ".SQLProfileProvider";
            return (ITPOJProfileProvider)Assembly.Load(profilePath).CreateInstance(className);
        }
    }
}
